package com.joe.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@RestController
public class Main {
    public static void main(String[] args) {
        SpringApplication.run(Main.class, args);
    }

    @RequestMapping("/test")
    public String hello() {
        return "Hello World!";
    }

    @RequestMapping("/test/{hello}")
    public String bug(@PathVariable String hello) {
        if("hello".equals(hello)) {
            return "False Hello World!";
        }
        return "Hello World!";
    }
}
